package cn.edu.ren.feign.imp;

import cn.edu.ren.feign.IStudentFeign;
import cn.edu.ren.pojo.Student;
import org.springframework.stereotype.Component;

import java.util.Collection;

/**
 * 当前服务提供者宕机之后，feign开启熔断机制，
 * 将会执行被注解@Component并且实现feign接口的实现类
 */
@Component
public class StudentFeignImp implements IStudentFeign {
    @Override
    public Collection<Student> findAll() {
        return null;
    }

    @Override
    public String index() {
        return "网络与服务器失去联系了....";
    }
}
